<?php

    namespace Wulian\Controller;

    use Common\Controller\AdminbaseController;

    class AdminLogController extends AdminbaseController {

        protected $m_log;

        function _initialize() {
            parent::_initialize();
            $this->m_log= D("Wulian/WlOperateLog");
        }

        /**
         * 列表页
         */
        public function index(){
            $s_content = I("post.s_content");
            $this->assign("s_content",$s_content);
            $where = array();
            if(!empty($s_content)){
                $where["operate_log_content"] = array("like","%{$s_content}%");
            }

            $count=$this->m_log->where($where)->count();
            $page = $this->page($count, 15);
            $list = $this->m_log->where($where)
                ->order("create_time DESC")
                ->limit($page->firstRow , $page->listRows)
                ->select();
            $this->assign("page", $page->show('Admin'));
            $this->assign("list",$list);
            $this->display();
        }



    }